#!/usr/bin/env bash

set -e

source <(cargo llvm-cov show-env --export-prefix "$@")
cargo llvm-cov clean --workspace

cargo build --locked --all-targets --all-features
cargo test --locked --all-features
cargo test --locked --no-default-features --features tls12,logging,aws_lc_rs,fips,std
cargo test --locked --no-default-features --features tls12,logging,ring,std

## bogo
cargo test --locked --all-features run_bogo_tests_ring -- --ignored
cargo test --locked --all-features run_bogo_tests_aws_lc_rs -- --ignored

cargo llvm-cov report "$@"
